package ZY10_22.Pet;

public class Pet {
    private String name;
    private String variety;
    private int weight;

    public Pet(){

    }

    public Pet(String name, String variety, int weight) {
        this.name = name;
        this.variety = variety;
        this.weight = weight;
    }

    public void show(){
        System.out.println("名字："+this.name+" 品种："+this.variety+" 体重："+this.weight);
        eat();
        sleep();
    }

    public void eat(){
        System.out.println(name+"会吃饭");
    }

    public void sleep(){
        System.out.println(name+"会睡觉");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
}
